home *** CD-ROM | disk | FTP | other *** search
/ CICA 1993 April / CICA MS Windows - April 1993.iso / unzipped / util / fsr / fsr.doc < prev    next >
Text File  |  1993-03-18  |  2KB  |  34 lines

  1. FSR.EXE
  2.  
  3.      This archive contains the C source code and executable for a Windows
  4. utility named FSR.EXE, which tracks free system resources in real time.
  5. When it is displayed as a window, FSR draws a horizontal bar that represents
  6. the percentage of free system resources. The bar scales to the size of the
  7. window, so you can make it as large or as small as you'd like. If free system
  8. resources falls below 20 percent, the bar changes from magenta to red as a
  9. warning. When it is reduced to an icon, FSR displays the percentage of free
  10. system resources in numeric form. The display is updated once a second. With
  11. FSR running, you should never again have to open Program Manager just to check
  12. free system resources.
  13.  
  14.       The heart of FSR is the function named GetFSR, which returns a DWORD
  15. (double word) value equal to the percentage of system resources free. In
  16. Windows 3.1, GetFSR calls the documented GetFreeSystemResources function
  17. to get a count of free system resources. In Windows 3.0, it calls the
  18. undocumented GetHeapSpaces function, which accepts a module handle and
  19. returns a DWORD whose high word is equal to the number of bytes in the
  20. default local heap and whose low word is equal to the number of free bytes
  21. in the heap. GetFSR calls GetHeapSpaces once with the module handle of
  22. USER and once with the module handle of GDI, computes percent free in
  23. each module by dividing free bytes by total bytes and multiplying by 100,
  24. and then returns the lesser of the two percentages. GetHeapSpaces was
  25. discussed in PC Magazine's November 12, 1991, Windows column, and it is
  26. treated at length in Undocumented Windows, by Andrew Schulman and others.
  27. GetHeapSpaces produces erroneous results in Windows 3.1, because it does
  28. not take into account the additional heaps set aside for USER and GDI.
  29.  
  30.       If you run it under Windows 3.1, FSR adds an "Always on Top"
  31. option to its system menu. When checked, "Always on Top" ensures that
  32. the FSR window stays visible even if another application is running
  33. full-screen. The program remembers how you last set it and automatically
  34. assumes the same configuration the next time you start it.